<%@ page language="java" import="java.util.*" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="StudentScore.StudentDao" %>
    <%@page import="StudentScore.StudentDaoJDBC" %>
    <%@page import="StudentScore.Student" %>
    <%@page import="java.util.List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form name="postForm" action="Achievement.jsp" method="post">
		<p>按成绩降序排序</p>
		<table width="500" border="5" >
		<tr>
			<td>学号</td>
			<td>姓名</td>
	    	<td>数学</td>
	    	<td>体育</td>
	    	<td>Java</td>
	    	<td>总成绩</td>
	  	</tr>
	  <%
		StudentDao student = new StudentDaoJDBC();
    	List<Student> studentList=student.showSortAchievement();
		for(Student e:studentList)
		{
		%>
			<tr>
    		<td><%=e.getStuno()%></td>
    		<td><%=e.getName() %></td>
    		<td><%=e.getMath() %></td>
    		<td><%=e.getSport() %></td>
    		<td><%=e.getJava() %></td>
    		<td><%=e.getAllscore()%></td>
    	    </tr>
    	   <%
    	   }
    	   %>
    	   
		</table>
		
		<input type="submit" value="返回菜单" />
	</form>
	<form name="form2" method="post" action="ExportExcel.jsp">
     <input type="submit" name="button2" id="button2" value="导出">
   </form>
</body>
</html>